﻿@using LView.CMS.Models;
@model List<LTask>
@{
    ViewData["Title"] = "教程资源文件管理";
}

<form class="layui-form layui-form-pane" style="width:100%;">
    <blockquote class="layui-elem-quote quoteBox">
        <div class="layui-inline">
            <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="addCourse">确定</button>
        </div>
        <div class="layui-inline">
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </blockquote>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">所属任务</label>
        <div class="layui-input-block">
            <select name="TaskId" class="TaskId" lay-verify="required" lay-filter="TaskId">
                <option value="">请选择教程所属任务</option>
                @foreach (var item in ViewData["TaskList"] as List<LTask>)
                {
                    <option value="@item.Id">@item.Name</option>
                }
            </select>
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">分类名称</label>
        <div class="layui-input-block">
            <input type="text" name="HandCategory" id="HandCategory" class="layui-input" style="position:absolute;z-index:2;width:95%;" lay-verify="required" autocomplete="off">
            <select id="CategoryId" name="CategoryId" class="CategoryId" lay-filter="CategoryId">
            </select>
            @*<input type="text" name="CategoryName" class="layui-input CategoryName" lay-verify="required|CategoryName" placeholder="请输入分类名称">*@
        </div>
    </div>
    @*<div class="layui-form-item layui-row layui-col-xs12">
            <label class="layui-form-label">分类描述</label>
            <div class="layui-input-block">
                <input type="text" name="CategoryDescription" class="layui-input CategoryDescription" lay-verify="required|CategoryDescription" placeholder="请输入分类描述">
            </div>
        </div>*@
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">教程名称</label>
        <div class="layui-input-block">
            <input type="text" name="CourseName" class="layui-input CourseName" lay-verify="required|CourseName" placeholder="请输入教程名称">
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">教程学时</label>
        <div class="layui-input-block">
            <input type="text" name="CoursePeriod" class="layui-input CoursePeriod" lay-verify="required|CoursePeriod" placeholder="请输入教程学时(分钟)">
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">教程学分</label>
        <div class="layui-input-block">
            <input type="text" name="CourseScore" class="layui-input CourseScore" lay-verify="required|CourseScore" placeholder="请输入教程学分">
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">教程描述</label>
        <div class="layui-input-block">
            <input type="text" name="CourseDescription" class="layui-input CourseDescription" lay-verify="required|CourseDescription" placeholder="请输入教程描述">
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">教程类型</label>
        <div class="layui-input-block">
            <input type="radio" name="CourseType" value="0" lay-filter="CourseTypeFilter" title="培训" checked>
            <input type="radio" name="CourseType" value="1" lay-filter="CourseTypeFilter" title="考试">
            <input type="radio" name="CourseType" value="2" lay-filter="CourseTypeFilter" title="其他" disabled>
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12 coursefile">
        <label class="layui-form-label">教程文件</label>
        <div class="layui-input-block">
            <select name="CourseFile" class="CourseFile" lay-filter="CourseFile" lay-verify="required">
                @foreach (var item in ViewData["FileList"] as List<LFile>)
                {
                    <option value="@item.Id">@item.Name</option>
                }
            </select>
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12 courseexam">
        <label class="layui-form-label">教程试卷</label>
        <div class="layui-input-block">
            <select name="ExamFile" class="ExamFile" lay-filter="ExamFile" lay-verify="required">
                @foreach (var item in ViewData["ExamList"] as List<LExam>)
                {
                    <option value="@item.Id">@item.Name</option>
                }
            </select>
        </div>
    </div>
</form>

@section Scripts{
    <script type="text/javascript" src="~/layui/layui.js"></script>
    <script type="text/javascript" src="~/js/Course/CourseAdd.js"></script>
}